package com.cn.common;

import java.util.List;

public class TopicRouteData {

    private List<QueueData> queueData;

    private List<BrokerData> brokerData;

    public TopicRouteData() {
    }

    public TopicRouteData(List<QueueData> queueData, List<BrokerData> brokerData) {
        this.queueData = queueData;
        this.brokerData = brokerData;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        TopicRouteData old = (TopicRouteData) obj;
        if (queueData == null) {
            if (old.getQueueData() != null) {
                return false;
            }
        } else if (!queueData.equals(old.getQueueData())) {
            return false;
        }

        if (brokerData == null) {
            if (old.getBrokerData() != null) {
                return false;
            }
        } else if (!brokerData.equals(old.getBrokerData())) {
            return false;
        }

        return true;
    }

    public List<QueueData> getQueueData() {
        return queueData;
    }

    public void setQueueData(List<QueueData> queueData) {
        this.queueData = queueData;
    }

    public List<BrokerData> getBrokerData() {
        return brokerData;
    }

    public void setBrokerData(List<BrokerData> brokerData) {
        this.brokerData = brokerData;
    }

    @Override
    public String toString() {
        return "TopicRouteData{" +
                "queueData=" + queueData +
                ", brokerData=" + brokerData +
                '}';
    }
}
